package de.kokolores.view
{
	import app.core.action.RotatableScalable;
	
	import de.kokolores.flex.BrowserCanvas;
	import de.kokolores.interfaces.IWindow;

	public class BrowserWindow extends RotatableScalable implements IWindow
	{
		
		private var _browserCanvas:BrowserCanvas;
		
		public function BrowserWindow()
		{
			initBrowserCanvas();
		}
		
		public function gotoUrl(url:String):void
		{
			_browserCanvas.myHTML.location = "http://"+url;
			_browserCanvas.urlTextInput.text = "http://"+url;
		}
		
		public function updateBar(key:String):void{
			if(key != "DO IT")
				_browserCanvas.urlTextInput.text += key;
		}
		
		private function initBrowserCanvas():void
		{
			_browserCanvas = new BrowserCanvas();
			addChild(_browserCanvas);
		}
		
		public function rotate(angle:int):void
		{
		}
		
		public function translate(offsetX:int, offsetY:int):void
		{
		}
		
	}
}